﻿using Model;
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;

namespace Hotfix
{
    [ObjectEvent]
    public class NetOuterComponentEvent : ObjectEvent<NetOuterComponent>, IAwake,IAwake<IPEndPoint>
    {
        public void Awake()
        {
            
        }

        public void Awake(IPEndPoint p1)
        {
            this.Get().Packer = new ProtobufPacker();
            this.Get().MessageDispatcher = new OuterMessageDispatcher();
            this.Get().Awake(p1);
        }
    }

    public static class NetOuterComponentSystem
    {
        public static void Awake(this NetOuterComponent self,IPEndPoint iPEndPoint)
        {
            self.Awake(iPEndPoint);
        }
    }
}
